package com.sgolub.commanndsonline.ws.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.sgolub.commanndsonline.ws.dao.AdvertisingRegistryItemDAO;
import com.sgolub.commanndsonline.ws.entity.AdvertisingRegistryItem;
import com.sgolub.commanndsonline.ws.entity.AdvertisingRegistryOperation;

@Service
public class AdvertisingRegistryItemServiceImpl implements AdvertisingRegistryItemService{

	@Autowired
	private AdvertisingRegistryItemDAO advertisingRegistryItemDAO;
	
	@Transactional
	public AdvertisingRegistryItem get(Integer id) {
		return advertisingRegistryItemDAO.get(id);
	}

	@Transactional
	public void add(AdvertisingRegistryItem advertisingRegistryItem) {
		advertisingRegistryItemDAO.add(advertisingRegistryItem);
	}

	@Transactional
	public void update(AdvertisingRegistryItem advertisingRegistryItem) {
		advertisingRegistryItemDAO.update(advertisingRegistryItem);
	}

	@Transactional
	public void remove(Integer id) {
		advertisingRegistryItemDAO.remove(id);
	}

	@Transactional
	public List<AdvertisingRegistryItem> list() {
		return advertisingRegistryItemDAO.list();
	}

	@Transactional
	public List<AdvertisingRegistryItem> listActive(){
		return advertisingRegistryItemDAO.listActive();
	}
	
	@Transactional
	public List<AdvertisingRegistryItem> filter() {
		return advertisingRegistryItemDAO.list();
	}
	
}
